<template>

    <span class="emb-platen-name" v-text="format"></span>
</template>

<script>

export default {
    props: {
        name: { type: String, default: () => '' },
        type: { type: String, default: () => '' },
    },

    computed: {
        format () {
            const names = this.name.match(/\d+/g) || []
            const width = names[0]
            const height = names[1]

            if (this.type == 'in') {
                return width + '×' + height + ' in'
            } else {
                return width + '″×' + height + '″'
            }
        }
    },
};
</script>

<style lang="scss" scoped>
</style>
